/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Sekertariat;

import PengendaliSuratDokumen.PengendaliTabel;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JTextField;

/**
 *
 * @author Indrayanto
 */
public class FrameSekretariat extends JFrame {

    private JFrame frame;
    private JMenuBar menubar;
    private JMenu menu1, menu2;
    private JMenuItem m1, m2, m3, m4;
    private JLabel logo, judul, nmProg;

    public FrameSekretariat() {
        frame = new JFrame();
        this.setBounds(0, 0, 800, 650);
        this.setIconImage(new ImageIcon("icon.png").getImage());
        this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        this.setResizable(false);
        this.setLayout(null);
        this.setTitle("Menu Sekretariat");

        logo = new JLabel(new ImageIcon("sadarbig.png"));
        logo.setBounds(220, 110, 400, 400);
        this.add(logo);

        menubar = new JMenuBar();
        menu1 = new JMenu("Pilihan");
        menu2 = new JMenu("Tool");
        m1 = new JMenuItem("Form Pengisian Surat / Dokumen");
        m2 = new JMenuItem("Menampilkan Daftar Surat / Dokumen");
        m3 = new JMenuItem("Membuat Tabel Surat");
        m4 = new JMenuItem("Membuat Tabel Dok.");
       

        setJMenuBar(menubar);
        menubar.add(menu1);
        menubar.add(menu2);
        menu1.add(m1);
        menu1.add(m2);
        menu2.add(m3);
        menu2.add(m4);
        

        judul = new JLabel("MENU UTAMA SEKRETARIAT");
        judul.setFont(new Font("Serif", Font.BOLD, 30));
        judul.setBounds(40, 30, 750, 50);
        judul.setHorizontalAlignment(JTextField.CENTER);
        this.add(judul);

        nmProg = new JLabel("Administrasi Surat Dan Dokumen");
        nmProg.setFont(new Font("Serif", Font.BOLD, 30));
        nmProg.setBounds(40, 70, 750, 50);;
        nmProg.setHorizontalAlignment(JTextField.CENTER);
        this.add(nmProg);

        m3.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                PengendaliTabel.membuatTabelSurat();
            }
        });
        m4.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent ae) {
                PengendaliTabel.membuatTabelDokumen();
            }
        });
        
    }

    public static void main(String[] args) {
        FrameSekretariat fut = new FrameSekretariat();
        fut.setVisible(true);
    }
}
